package cn.qdhlm.frontendprocessor.model.memory;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Name:SendResultMap
 * @description:
 * @author: xinY
 **/
public class SendCommandResultMap {
    public static Map<String,String> sendResultMap = new HashMap<>();
    public static void add(String key, String value){
        sendResultMap.put(key,value);
    }
    public static void clear(){
        sendResultMap.clear();
    }

    public static String get(String key){
        return sendResultMap.get(key);
    }

    public static List<String> getAll(){
        List<String> list = new ArrayList<>();
        for (String key : sendResultMap.keySet()){
            list.add("send "+key+":"+get(key));
        }
        return list;
    }
}
